<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<% String path = request.getContextPath();%>
<html>
<head>
    <meta charset="utf-8">
    <title>等你回家</title>
    <link href="<%=path%>/web/index/css/style.css" rel="stylesheet" type="text/css" media="all" />
    <link rel="stylesheet" href="<%=path%>/web/static/css/bootstrap.min.css">


    <link rel="icon" href="<%=path%>/web/static/images/favicon.png" type="image/png" sizes="32x32">
    <link href="<%=path%>/web/index/css/bootstrap.css" rel="stylesheet" type="text/css" media="all" />
    <link rel="stylesheet" href="<%=path%>/web/static/css/style.css">



    <link href="<%=path%>/web/index/css/base.css" rel="stylesheet">
    <link href="<%=path%>/web/index/css/index.css" rel="stylesheet">
    <link href="<%=path%>/web/index/css/task.css" rel="stylesheet">
    <link href="<%=path %>/web/static/css/blog-detail.css" rel="stylesheet">
</head>
<body>
<!--header-->
<div class="banner-in">
    <div class="container">
        <h6>HOME / <span>等你回家</span></h6>
    </div>
</div>
<!--header-->
<div class="header">
    <div class="container">
        <div class="logo">
            <a href="<%=path %>/web/index"><img src="<%=path %>/web/index/images/logo.png" alt=" " /></a>
        </div>
        <div class="top-nav">
            <span class="menu"> </span>
            <ul>
                <li ><a href="${pageContext.request.contextPath}/web/index" class="scroll">首页</a></li>
                <li><a href="<%=path %>/web/information/chooseType" class="scroll">你在哪儿</a></li>
                <li  class="active"><a href="<%=path %>/web/information/informationList?lostTypeId=0" class="scroll">我想回家</a></li>
                <li><a href="<%=path %>/web/blogger/blog" class="scroll">日志论坛</a></li>
                <li><a href="<%=path %>/web/task/releaseTask" class="scroll">任务列表</a></li>
                <c:if test="${empty(sessionScope.userinfo)}" var="result">
                    <li><a href="<%=path %>/web/userinfo/register" class="scroll">注册</a>|<a href="<%=path %>/web/userinfo/login" class="scroll">登录</a></li>
                </c:if>
                <c:if test="${not result}">
                    <li><a href="<%=path%>/web/userinfo/applyVolunteer" class="scroll">加入我们</a></li>
                    <c:if test="${(sessionScope.userinfo.username eq '')||(sessionScope.userinfo.username eq NULL)}" var="result">
                        <span style="color:white">欢迎<a href="<%=path %>/web/userinfo/index" style="color: white" href="">${sessionScope.userinfo.phone}</a></span>
                    </c:if>
                    <c:if test="${not result}">
                        <span style="color:white">欢迎<a href="<%=path %>/web/userinfo/index" style="color: white" href="">${sessionScope.userinfo.username}</a></span>
                    </c:if>
                    <span style="color: white">|</span>

                    <span style="color:white"><a style="color: white" href="<%=path %>/web/userinfo/logout">注销</a></span>
                    <span style="color: white">|</span>
                    <label><img style="width:30px;height: 30px" src="<%=path %>/web/uploadImages/${sessionScope.userinfo.pic}"></label>
                </c:if>
            </ul>
            <!--script-->
            <script>
                $("span.menu").click(function(){
                    $(".top-nav ul").slideToggle(500, function(){
                    });
                });
            </script>
        </div>
        <div class="clearfix"> </div>
    </div>
</div>




<c:if test="${requestScope.information1.lostTypeId eq 1}">
    <article>
        <h1 class="t_nav"><span>您现在的位置是：首页 > 信息列表 > 详情</span></h1>
        <div class="infos">
            <div class="wm-note-date">
                    <%--<span><fmt:formatDate value="${requestScope.journal.inputTime}" pattern="y-MM-dd HH:mm:ss"></fmt:formatDate></span>--%>
            </div>
            <div class="blog-title">
                <h3>${requestScope.information1.name}</h3>
                <input type="hidden" value="${requestScope.information1.id}" class="ids">
            </div>

            <div class="blog-content">
                <div>
                    <div class="blog-img mb-4">
                        <img src="<%=path%>/web/uploadImages/${requestScope.information1.pic}" alt="image" style="max-height:340px;">
                    </div>

                    <div style="margin-left:420px;margin-top: -355px;">
                        <p>
                            失踪类型：家寻宝贝<br>
                            性别:${requestScope.information1.sex}<br>
                            血型:${requestScope.information1.blood}<br>
                            丢失身高:${requestScope.information1.lostHeight}<br>
                            丢失体重:${requestScope.information1.lostWeight}<br>
                            丢失着装:${requestScope.information1.lostClothes}<br>
                            丢失经过:${requestScope.information1.lostProcess}<br>
                            走失时间:${requestScope.information1.lostDateStart}
                            走失地点:${requestScope.information1.lostPlace}<br>
                            详细备注:${requestScope.information1.lostRemark}<br>
                            联系人姓名:${requestScope.information1.contactName}<br>
                            联系人电话:${requestScope.information1.contactNumber}
                        </p>
                    </div>
                </div>
            </div>
            <div style="margin-left: 15px;" class="news_pl">
                <ul class="wm-comment-list">
                <li>
                    <div class="single-work-history">
                        <div class="single-candidate-list" style="border: 1px solid #e8ecec;border-radius:5px; width:98%;margin-top: 100px;">
                            <div class="main-comment" style="padding: 0px 10px 0px 40px;font-weight: normal !important;margin-top: 10px;margin-left: -20px;">
                                <div class="tianxie">

                              </div>
                            </div>
                        </div>
                    </div>
                </li>
            </ul>
    <c:if test="${sessionScope.userinfo.volunteer eq true}">
                    <h5>发布线索:</h5>
                    <br/>
                    <main class="main-content-area clearfix">
                        <div>
                            <div style="margin-left:20px;"> <textarea id="info" name="info" rows="20" cols="100" class="bianxie"></textarea></div><span id="neirongs"></span><br>
                            <button type="button" style="margin-left:280px;" class="fabu">发布</button>
                        </div>
                    </main>
                </c:if>
            </div>
            </div>
        </div>
        </div>
        </div>
        <div style="margin-left: 55px;" class="col-md-3">
            <div class="store-right">
                <h6 class="Task-btn">
                    <c:if test="${requestScope.attention eq 'true'}" var="result">
                        <input class="Button" disabled type="button" value="已关注"/>
                    </c:if>
                    <c:if test="${not result}">
                        <input class="" type="button"  value="关注"/>
                    </c:if>
                </h6>
            </div>
            <div class="store-right" style="margin-top:30px">
                <h6>其他</h6>
                <ul class="store-men">
                    <c:forEach  var="i" varStatus="stat" begin="0" end="4">
                        <li><a href="${pageContext.request.contextPath}/web/information/showList?id=${requestScope.information[i].id}"><span> </span>${requestScope.information[i].name}
                        </a></li>
                    </c:forEach>
                </ul>
            </div>
        </div>
    </article>
</c:if>
<c:if test="${requestScope.information1.lostTypeId eq 2}">
    <article>
        <h1 class="t_nav"><span>您现在的位置是：首页 > 信息列表 > 详情</span></h1>
        <div class="infos">
            <div class="wm-note-date">
                    <%--<span><fmt:formatDate value="${requestScope.journal.inputTime}" pattern="y-MM-dd HH:mm:ss"></fmt:formatDate></span>--%>
            </div>
            <div class="blog-title">
                <h3>${requestScope.information1.name}</h3>
                <input type="hidden" value="${requestScope.information1.id}" class="ids">
            </div>

            <div class="blog-content">
                <div>
                    <div class="blog-img mb-4">
                        <img src="<%=path%>/web/uploadImages/${requestScope.information1.pic}" alt="image" style="max-height:340px;">
                    </div>

                    <div style="margin-left:420px;margin-top: -355px;">
                        <p>
                            失踪类型：宝贝寻家<br>
                            性别:${requestScope.information1.sex}<br>
                            血型:${requestScope.information1.blood}<br>
                            丢失身高:${requestScope.information1.lostHeight}<br>
                            丢失体重:${requestScope.information1.lostWeight}<br>
                            丢失着装:${requestScope.information1.lostClothes}<br>
                            丢失经过:${requestScope.information1.lostProcess}<br>
                            走失时间:${requestScope.information1.lostDateStart}
                            走失地点:${requestScope.information1.lostPlace}<br>
                            详细备注:${requestScope.information1.lostRemark}<br>
                            联系人姓名:${requestScope.information1.contactName}<br>
                            联系人电话:${requestScope.information1.contactNumber}
                        </p>
                    </div>
                </div>
            </div>
            <div style="margin-left: 15px;" class="news_pl">
                <ul class="wm-comment-list">
                    <li>
                        <div class="single-work-history">
                            <div class="single-candidate-list" style="border: 1px solid #e8ecec;border-radius:5px; width:98%;margin-top: 100px;">
                                <div class="main-comment" style="padding: 0px 10px 0px 40px;font-weight: normal !important;margin-top: 10px;margin-left: -20px;">
                                    <div class="tianxie">

                                    </div>
                                </div>
                            </div>
                        </div>
                    </li>
                </ul>
                <c:if test="${sessionScope.userinfo.volunteer eq true}">
                    <h5>发布线索:</h5>
                    <br/>
                    <main class="main-content-area clearfix">
                        <div>
                            <div style="margin-left:20px;"> <textarea id="info" name="info" rows="20" cols="100" class="bianxie"></textarea></div><span id="neirongs"></span><br>
                            <button type="button" style="margin-left:280px;" class="fabu">发布</button>
                        </div>
                    </main>
                </c:if>
            </div>
        </div>
        </div>
        </div>
        </div>
        <div style="margin-left: 55px;" class="col-md-3">
            <div class="store-right">
                <h6 class="Task-btn">
                    <c:if test="${requestScope.attention eq 'true'}" var="result">
                        <input class="Button" disabled type="button" value="已关注"/>
                    </c:if>
                    <c:if test="${not result}">
                        <input class="" type="button"  value="关注"/>
                    </c:if>
                </h6>
            </div>
            <div class="store-right" style="margin-top:30px">
                <h6>其他</h6>
                <ul class="store-men">
                    <c:forEach  var="i" varStatus="stat" begin="0" end="4">
                        <li><a href="${pageContext.request.contextPath}/web/information/showList?id=${requestScope.information[i].id}"><span> </span>${requestScope.information[i].name}
                        </a></li>
                    </c:forEach>
                </ul>
            </div>
        </div>
    </article>
</c:if>

<c:if test="${requestScope.information1.lostTypeId eq 3}">
    <article>
        <h1 class="t_nav"><span>您现在的位置是：首页 > 信息列表 > 详情</span></h1>
        <div class="infos">
            <div class="wm-note-date">
                    <%--<span><fmt:formatDate value="${requestScope.journal.inputTime}" pattern="y-MM-dd HH:mm:ss"></fmt:formatDate></span>--%>
            </div>
            <div class="blog-title">
                <h3>${requestScope.information1.name}</h3>
                <input type="hidden" value="${requestScope.information1.id}" class="ids">
            </div>

            <div class="blog-content">
                <div>
                    <div class="blog-img mb-4">
                        <img src="<%=path%>/web/uploadImages/${requestScope.information1.pic}" alt="image" style="max-height:340px;">
                    </div>

                    <div style="margin-left:420px;margin-top: -355px;">
                        <p>
                            失踪类型：流浪乞讨<br>
                            性别:${requestScope.information1.sex}<br>
                            血型:${requestScope.information1.blood}<br>
<%--                            走失地点:${requestScope.information1.lostPlace}<br>--%>
<%--                            走失时间:${requestScope.information1.lostDateStart}--%>
                            丢失身高:${requestScope.information1.lostHeight}<br>
                            丢失体重:${requestScope.information1.lostWeight}<br>
                            丢失着装:${requestScope.information1.lostClothes}<br>
                            丢失经过:${requestScope.information1.lostProcess}<br>
                            发现时间:${requestScope.information1.lostDateStart}<br>
                            发现地点:${requestScope.information1.findPlace}<br>
                            详细备注:${requestScope.information1.lostRemark}<br>
                            联系人姓名:${requestScope.information1.contactName}<br>
                            联系人电话:${requestScope.information1.contactNumber}
                        </p>
                    </div>
                </div>
            </div>
            <div style="margin-left: 15px;" class="news_pl">
                <ul class="wm-comment-list">
                    <li>
                        <div class="single-work-history">
                            <div class="single-candidate-list" style="border: 1px solid #e8ecec;border-radius:5px; width:98%;margin-top: 100px;">
                                <div class="main-comment" style="padding: 0px 10px 0px 40px;font-weight: normal !important;margin-top: 10px;margin-left: -20px;">
                                    <div class="tianxie">

                                    </div>
                                </div>
                            </div>
                        </div>
                    </li>
                </ul>
                <c:if test="${sessionScope.userinfo.volunteer eq true}">
                    <h5>发布线索:</h5>
                    <br/>
                    <main class="main-content-area clearfix">
                        <div>
                            <div style="margin-left:20px;"> <textarea id="info" name="info" rows="20" cols="100" class="bianxie"></textarea></div><span id="neirongs"></span><br>
                            <button type="button" style="margin-left:280px;" class="fabu">发布</button>
                        </div>
                    </main>
                </c:if>
            </div>
        </div>
        </div>
        </div>
        </div>
        <div style="margin-left: 55px;" class="col-md-3">
            <div class="store-right">
                <h6 class="Task-btn">
                <c:if test="${requestScope.attention eq 'true'}" var="result">
                    <input class="Button" disabled type="button" value="已关注"/>
                </c:if>
                <c:if test="${not result}">
                    <input class="" type="button"  value="关注"/>
                </c:if>
                </h6>
            </div>
            <div class="store-right" style="margin-top:30px">
                <h6>其他</h6>
                <ul class="store-men">
                    <c:forEach  var="i" varStatus="stat" begin="0" end="4">
                        <li><a href="${pageContext.request.contextPath}/web/information/showList?id=${requestScope.information[i].id}"><span> </span>${requestScope.information[i].name}
                        </a></li>
                    </c:forEach>
                </ul>
            </div>
        </div>
    </article>
</c:if>



<!--footer-area-start -->
<footer>
    <div class="footer" style="height: 230px;">
        <div class="container" style="margin-top: -40px;">
            <p style="font-size: 15px;"><span style="font-size: 20px;">等你回家</span><span >邮箱:1111111@163.com</span> 电话:0532—85025005</p>
            <p class="footer-class" style="font-size:15px;margin-top: -60px;">地址:山东省青岛市市南区中联创意广场B1栋三楼 <a href="http://w3layouts.com/" target="_blank">万码学堂</a></p>
            <p class="footer-class" style="font-size:15px;margin-top: -45px;text-transform: none">Copyright © 2019 www.dengnihuijia.com All rights Reserved.</p>
        </div>
    </div>
</footer>

<script src="<%=path%>/web/static/js/modules/jquery-3.4.1.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/web/ueditor/ueditor.config.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="${pageContext.request.contextPath}/web/ueditor/ueditor.all.js"></script>
<!-- 实例化编辑器 -->
</body>

</html>
<script>
    var ue = UE.getEditor('info',{
        toolbars: [[
            // 'fullscreen', 'source', '|', 'undo', 'redo', '|',
            // 'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|',
            // 'rowspacingtop', 'rowspacingbottom', 'lineheight', '|',
            // 'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|',
            // 'directionalityltr', 'directionalityrtl', 'indent', '|',
            // 'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|',
            // 'link', 'unlink', 'anchor', '|', 'imagenone', 'imageleft', 'imageright', 'imagecenter', '|',
            // 'simpleupload', 'insertimage', 'emotion', 'scrawl', 'insertvideo', 'music', 'attachment', 'map', 'gmap', 'insertframe', 'insertcode', 'webapp', 'pagebreak', 'template', 'background', '|',
            // 'horizontal', 'date', 'time', 'spechars', 'snapscreen', 'wordimage', '|',
            // 'inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow', 'deleterow', 'insertcol', 'deletecol', 'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols', 'charts', '|',
            // 'print', 'preview', 'searchreplace', 'drafts', 'help'
            'fullscreen', 'source', '|', 'undo', 'redo', '|',
            'bold',  '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|',
            'rowspacingtop', 'rowspacingbottom','|',
            'indent', '|',
            'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', 'imagenone', '|'
        ]]
    });



    $(function () {

        var infop=false;
        if(${not empty requestScope.task}){
            titlep=true;
            infop=true;
        }
        ue.addListener("blur",function () {
            var editor=UE.getEditor('info');
            var arr=(UE.getEditor('info').getContentTxt());
            if(arr!="")
            {
                $("#neirongs").html("");
                infop=true;
            }
            else {
                $("#neirongs").html("内容不能为空");
                $("#neirongs").css("color","red");
                infop=false;
            }
        });
        $("#form").submit(function () {
            if(infop==true)
            {
                return true;
            }
            else {
                return false;
            }
        });


        init(1);//评论查询初始化
        $(".fabu").click(function () {    //添加评论
            /*var text=$(".bianxie").val();*/
            var text=(UE.getEditor('info').getContentTxt());
            alert(text);
            var rzid=$(".ids").val();
            var action ="${pageContext.request.contextPath}/clue/remark";
            $.get(action,{text:text,rzid:rzid},function () {
                init();
                alert("等待审批");
            })
        })




        //关注
        $(".Task-btn input").click(function(){
            var informationId = ${requestScope.information1.id};
            var cl = $(this).attr("class");
            if(cl==""){

                $.get("<%=path %>/web/attention/attention",{informationId:informationId},function (mes) {
                    if(mes=="login"){
                        window.location.href="<%=path %>/web/userinfo/login";
                    }
                    if(mes=="ok"){
                        $(this).val("已关注")
                        $(this).attr("class","Botton");
                        $(this).css("background","#e0e0e0");
                        $(this).css("border-width","0px");
                        $(this).prop("disabled","true")
                    }
                }.bind(this))
            }

        })
    })



    function init(pageNum) {  //一级评论初始化方法
        $.get("${pageContext.request.contextPath}/clue/informationListAll", {id:${requestScope.information1.id},pageNum:pageNum}, function (mes) {
            $(".tianxie").empty();
            $(".tianxie").html(mes);
        })
    }

    $(".tianxie").on("click", ".pinglunfenye a", function () { //给页码加点击事件
        var pageNum = $(this).data("id");
        init(pageNum);
        return false;

    })
</script>
